package domain;

public class User {
	
	private String name;
	private int udpport;
	private String address;
	private int groupbidden = 0;
	
	public User(String name, int udpport, String address) {
		this.name=name;
		this.udpport=udpport;
		this.address = address;
	}
	
	public String getAddress()  {
		return this.address;
	}
	
	public void setAddress(String address) {
		this.address = address;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getUdpport() {
		return udpport;
	}

	public void setUdpport(int udpport) {
		this.udpport = udpport;
	}

	/**
	 * @return the denied
	 */
	public int getGroupbidden() {
		return groupbidden;
	}

	/**
	 * @param denied the denied to set
	 */
	public void setGroupbidden(int denied) {
		this.groupbidden = denied;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}
	
	
	

}
